One of the challenging problems in colour image processing is adjusting the colour gains of the captured image in order to compensate for the variations in the imaging sensor's ability to reproduce the colours reliably when imaging is performed in the presence of a light source with certain spectral properties. These spectral properties also imply the colour temperature of the illuminating light source. Imaging sensors can have significant differences in their spectral response when exposed to different types of common sources of illumination. The sensor response is also typically non-linear and, therefore, depends on the amount of the incoming light and on several other ambient conditions. For these reasons, it is necessary to correct for this problem in imaging systems, and operations related to this are broadly referred to as white balancing. In order to compensate for changes in illumination spectra, the gains of the colour processing systems and/or imager should be adjusted. This adjustment is usually performed to correct for the overall luminance (brightness) of the image and to approach an acceptable reproduction of the perceived colours in the imaged scene. For this purpose, various methods of automatic white balancing (AWB) have been developed. In most camera systems, AWB is an integral part of the image reconstruction chain and is used to ensure that colours of an imaged scene will be reproduced correctly, even if the image has been recorded in varying lightning conditions, for example, in sunshine or in artificial lightning conditions. AWB defines the offset and gain values that will be associated with each colour component, red (R), green (G) and blue (B). The result defines the colour balance of the image.
When the spectra of the illumination source are unknown to the image reconstruction device, then the AWB adjustment is performed based on an analysis of the captured image itself. These AWB algorithms are typically based on histogram measures that will ultimately define a unique, global offset and gain value associated with each colour component. This approach is based on the premise that in complex images all colours are represented rather equally in all parts of the image. Thus, the gain values associated with all RGB colour components in the image can be defined as constants across the entire image area. In this approach, the auto white balance correction is made globally over the whole image.
If an imaged scene contains a large set of objects of varied and different colours or even large gray areas, the colours of the image will be reproduced substantially correctly. However, if the image contains any large substantially monochromatic region, e.g. a landscape with large portions of blue sky, or if the image is taken in uneven illuminating conditions, the conventional approach fails. Herein, uneven illumination refers to situations, wherein different parts of the image have been illuminated by light sources having different spectral and/or intensity properties.
In order to enhance the analysis of the differences in the illumination spectra of an image, US20030222992 proposes to divide the image into subframes and utilize only those parts of the image, which can be recognized clearly as non-monochromatic, for white balance correction calculations. Then the overall white-balance of the image can be shifted, if a change in the colour average is due to a change in the spectra of illumination, and not due to a presence of large monochromatic areas in the image.
However, a problem associated with the above arrangement is that the sub-frame division is only used to include or exclude certain parts of the image for global AWB correction analyses. Said method still determines a global AWB correction for the whole image after the sub-frame analysis has been performed. As a result, if an image includes areas with differences in relative illumination, these global AWB correction parameters applied for the whole image cannot compensate for these differences.